package cn.wolfcode.trip.base.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * 注册用户
 */
@Setter
@Getter
@ToString
@ApiModel(value="用户",description="平台注册用户模型")
public class User extends BaseDomain{

    public static final int GENDER_SECRET = -1;//保密
    public static final int GENDER_MAN = 0;//男
    public static final int GENDER_WOMAN = 1;//女

    //邮箱
    private String email;
    //昵称
    @ApiModelProperty(value="昵称",name="nickName",dataType = "String",required = true)
    private String nickName;
    //密码
    private String password;
    //地区
    private String place;
    //头像
    private String headImgUrl;
    //性别
    private Integer gender = GENDER_SECRET;
    //封面
    private String coverImgUrl;
    //签名
    private String sign;
    //粉丝数
    private Integer fansNum = 0;
    //关注数
    private Integer followNum = 0;

    public String getGenderName(){
        String temp = "保密";
        if(gender==GENDER_MAN){
            temp = "男";
        }else if(gender==GENDER_WOMAN){
            temp = "女";
        }
        return temp;
    }

}